import React, {Component} from 'react'
import {connect} from "react-redux";
import {valueChange} from "../reduce/actions/valueChange_action";



class OtherCon extends Component {
    changeValue=(e)=>{
        this.props.valueChange(e.target.value)
    }

    render() {
        return (
            <div>
                <h2>valuechange组件</h2>
                <h4>计算结果：{this.props.count}</h4>
                <input type="text" onBlur={(e)=>this.changeValue(e)}/>
            </div>
        )
    }
}


export default connect(
    state=>({
        inputValue:state.inputValue,
        count:state.count}),
    {
         valueChange
    }
)(OtherCon)
